package com.java_base.array_study;

public class ArrayDemo01 {
    public static void main(String[] args) {
        // 目标：静态初始化方式定义数组

        // 数据类型[] 数组名称 = new 数据类型[]{元素1,元素2,元素3,....};
        double[] scores = new double[]{99.5,88.0,75.5};
        int[] ages = new int[]{12,24,36};
        String[] names = new String[]{"张三","李四","王五"};

        // 简化格式：数据类型[] 数组名称 = {元素1,元素2,元素3,....};
        double[] scores1 = {99.5,88.0,75.5};
        int[] ages1 = {12,24,36};
        String[] names1 = {"张三","李四","王五"};
        System.out.println(scores);
        System.out.println(ages);
        System.out.println(names);
    }
}
